

#ifndef __FILE_WRITE_H__
#define __FILE_WRITE_H__

#ifdef __cplusplus
extern "C" {
#endif

#include <unistd.h>

#define MAX_LOG_FILE_SIZE (20 * 1024 * 1024) // 20 MB

#define WRITE_BUFFER_SIZE (128 * 1024)
#define FLUSH_TIMEOUT_MS 300

int file_write_init();
int file_write(const void *buf, size_t count);
int file_write_check();
int file_write_deinit();
int file_write_flush();

#ifdef __cplusplus
}
#endif

#endif /*__FILE_WRITE_H__ */